adding a button in javascript

40

adding a button in javascript -

// The code below should help
let btn = document.createElement("button");
btn.innerHTML = "Submit";
btn.type = "submit";
btn.name = "formBtn";
document.body.appendChild(btn);

Comments

Submit
0 Comments